sqoop import \
--connect  jdbc:mysql://node101:3306/NetEase_db \
--username root \
--password 123456 \
--query 'SELECT log_id, user_id, device_id, action_time, action_type, song_id, artist_id, album_id, play_duration, network_type, ip, province, city, client_version, os_type, extra_info FROM NetEase_db.user_action_log WHERE $CONDITIONS AND 1=1;' \
--delete-target-dir \
--target-dir 'hdfs://node101:8020/warehouse/wyy_log/ods_user_action_log/2025-07-25' \
--as-textfile \
--fields-terminated-by ',' \
--num-mappers 1 \
--null-string '\\N' \
--null-non-string '\\N'

sqoop import \
--connect  jdbc:mysql://node101:3306/NetEase_db \
--username root \
--password 123456 \
--query 'SELECT user_id, username, nickname, gender, age, birthday, register_date, register_channel, vip_level, vip_expire_date, phone, email, province, city, tags, is_musician, musician_level, update_time FROM NetEase_db.user_info WHERE $CONDITIONS AND 1=1;' \
--delete-target-dir \
--target-dir 'hdfs://node101:8020/warehouse/wyy_log/ods_user_info/2025-07-25' \
--as-textfile \
--fields-terminated-by ',' \
--num-mappers 1 \
--null-string '\\N' \
--null-non-string '\\N'

sqoop import \
--connect  jdbc:mysql://node101:3306/NetEase_db \
--username root \
--password 123456 \
--query 'SELECT song_id, song_name, song_alias, artist_id, artist_name, album_id, album_name, duration, language, genre, publish_date, copyright_company, is_original, is_high_quality, is_free, play_count_total, lyric_count, comment_count, update_time FROM NetEase_db.music_info WHERE $CONDITIONS AND 1=1;' \
--delete-target-dir \
--target-dir 'hdfs://node101:8020/warehouse/wyy_log/ods_song_info/2025-07-25' \
--as-textfile \
--fields-terminated-by ',' \
--num-mappers 1 \
--null-string '\\N' \
--null-non-string '\\N'

sqoop import \
--connect  jdbc:mysql://node101:3306/NetEase_db \
--username root \
--password 123456 \
--query 'SELECT artist_id, artist_name, artist_alias, gender, birth_date, country, province, city, category, debut_date, company, fans_count, song_count, album_count, mv_count, is_indie, tags, update_time FROM NetEase_db.artist_info WHERE $CONDITIONS AND 1=1;' \
--delete-target-dir \
--target-dir 'hdfs://node101:8020/warehouse/wyy_log/ods_artist_info/2025-07-25' \
--as-textfile \
--fields-terminated-by ',' \
--num-mappers 1 \
--null-string '\\N' \
--null-non-string '\\N'

sqoop import \
--connect  jdbc:mysql://node101:3306/NetEase_db \
--username root \
--password 123456 \
--query 'SELECT album_id, album_name, artist_id, artist_name, publish_date, company, language, genre, song_count, play_count_total, description, cover_url, is_digital, price, update_time FROM NetEase_db.album_info WHERE $CONDITIONS AND 1=1;' \
--delete-target-dir \
--target-dir 'hdfs://node101:8020/warehouse/wyy_log/ods_album_info/2025-07-25' \
--as-textfile \
--fields-terminated-by ',' \
--num-mappers 1 \
--null-string '\\N' \
--null-non-string '\\N'

sqoop import \
--connect  jdbc:mysql://node101:3306/NetEase_db \
--username root \
--password 123456 \
--query 'SELECT device_id, device_type, brand, model, os_type, os_version, screen_width, screen_height, network_type, resolution, cpu_type, ram_size, rom_size, update_time FROM NetEase_db.device_info WHERE $CONDITIONS AND 1=1;' \
--delete-target-dir \
--target-dir 'hdfs://node101:8020/warehouse/wyy_log/ods_device_info/2025-07-25' \
--as-textfile \
--fields-terminated-by ',' \
--num-mappers 1 \
--null-string '\\N' \
--null-non-string '\\N'